Left Termination of the query pattern
p_in_1(a)
w.r.t. the given Prolog program could successfully be proven:
↳ Prolog
↳ PrologToPiTRSProof
Clauses:
p(X) :- ','(q(f(Y)), p(Y)).
q(g(Y)).
Queries:
p(a).
We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_a(X) → U1_a(X, q_in_g(f(Y)))
q_in_g(g(Y)) → q_out_g(g(Y))
U1_a(X, q_out_g(f(Y))) → U2_a(X, p_in_a(Y))
U2_a(X, p_out_a(Y)) → p_out_a(X)
The argument filtering Pi contains the following mapping:
p_in_a(x1) = p_in_a
U1_a(x1, x2) = U1_a(x2)
q_in_g(x1) = q_in_g(x1)
f(x1) = f
g(x1) = g(x1)
q_out_g(x1) = q_out_g
U2_a(x1, x2) = U2_a(x2)
p_out_a(x1) = p_out_a
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
Pi-finite rewrite system:
The TRS R consists of the following rules:
p_in_a(X) → U1_a(X, q_in_g(f(Y)))
q_in_g(g(Y)) → q_out_g(g(Y))
U1_a(X, q_out_g(f(Y))) → U2_a(X, p_in_a(Y))
U2_a(X, p_out_a(Y)) → p_out_a(X)
The argument filtering Pi contains the following mapping:
p_in_a(x1) = p_in_a
U1_a(x1, x2) = U1_a(x2)
q_in_g(x1) = q_in_g(x1)
f(x1) = f
g(x1) = g(x1)
q_out_g(x1) = q_out_g
U2_a(x1, x2) = U2_a(x2)
p_out_a(x1) = p_out_a
Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
P_IN_A(X) → U1_A(X, q_in_g(f(Y)))
P_IN_A(X) → Q_IN_G(f(Y))
U1_A(X, q_out_g(f(Y))) → U2_A(X, p_in_a(Y))
U1_A(X, q_out_g(f(Y))) → P_IN_A(Y)
The TRS R consists of the following rules:
p_in_a(X) → U1_a(X, q_in_g(f(Y)))
q_in_g(g(Y)) → q_out_g(g(Y))
U1_a(X, q_out_g(f(Y))) → U2_a(X, p_in_a(Y))
U2_a(X, p_out_a(Y)) → p_out_a(X)
The argument filtering Pi contains the following mapping:
p_in_a(x1) = p_in_a
U1_a(x1, x2) = U1_a(x2)
q_in_g(x1) = q_in_g(x1)
f(x1) = f
g(x1) = g(x1)
q_out_g(x1) = q_out_g
U2_a(x1, x2) = U2_a(x2)
p_out_a(x1) = p_out_a
U1_A(x1, x2) = U1_A(x2)
U2_A(x1, x2) = U2_A(x2)
P_IN_A(x1) = P_IN_A
Q_IN_G(x1) = Q_IN_G(x1)
We have to consider all (P,R,Pi)-chains
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
Pi DP problem:
The TRS P consists of the following rules:
P_IN_A(X) → U1_A(X, q_in_g(f(Y)))
P_IN_A(X) → Q_IN_G(f(Y))
U1_A(X, q_out_g(f(Y))) → U2_A(X, p_in_a(Y))
U1_A(X, q_out_g(f(Y))) → P_IN_A(Y)
The TRS R consists of the following rules:
p_in_a(X) → U1_a(X, q_in_g(f(Y)))
q_in_g(g(Y)) → q_out_g(g(Y))
U1_a(X, q_out_g(f(Y))) → U2_a(X, p_in_a(Y))
U2_a(X, p_out_a(Y)) → p_out_a(X)
The argument filtering Pi contains the following mapping:
p_in_a(x1) = p_in_a
U1_a(x1, x2) = U1_a(x2)
q_in_g(x1) = q_in_g(x1)
f(x1) = f
g(x1) = g(x1)
q_out_g(x1) = q_out_g
U2_a(x1, x2) = U2_a(x2)
p_out_a(x1) = p_out_a
U1_A(x1, x2) = U1_A(x2)
U2_A(x1, x2) = U2_A(x2)
P_IN_A(x1) = P_IN_A
Q_IN_G(x1) = Q_IN_G(x1)
We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 0 SCCs with 4 less nodes.